package com.dly.hope.model.ro;

import com.dly.hope.constant.LoginType;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author linyu.dai
 * @creat 2022/8/27 19:15:44
 */
@Data
@ApiModel
public class LoginRo {

    /**
     * 账号
     */
    @ApiModelProperty(name = "account",required = true)
    @NotBlank(message = "账号不能为空")
    private String account;

    /**
     * 密码
     */
    @ApiModelProperty(name = "password",required = true)
    @NotBlank(message = "密码不能为空")
    private String password;

    /**
     * 登入类型
     */
    @ApiModelProperty(name = "loginType",required = true, example = "Email:账号登入 Account:邮箱登入")
    @NotNull(message = "登入类型不能为空/或者类型错误")  //枚举类型不能用@NotBlank
    private LoginType loginType;
}
